<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>日志分析结果</title>

    <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script>
    <!-- 引入 echarts.js -->
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>
<body>
<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 1000px;height:660px; margin: auto"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    $.get('execute', function (result) {
        myChart.setOption({
            title: {
                text: '最近7天平均PV量'
            },
            tooltip: {},
            legend: {
                data:['日期']
            },
            xAxis: {
                data: result.dates
            },
            yAxis: {},
            series: [{
                name: '日平均PV量',
                type: 'bar',
                data: result.data
            }]
        })
    }, 'json')
</script>
</body>
</html>